﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int n = 123;
	int count = 0;
	while (n > 0)
	{
		count++;
		n &= (n - 1);
	}
	printf("二进制中1的个数是:%d", count);
	return 0;
}